package com.medical.standard.entity;

public class Inspection {
    private Integer inspectionId;
    private Integer standardId;
    private String projectNum;
    private String projectName;
    private String projectRequirement;

    public Inspection() {}

    public Inspection(Integer standardId, String projectNum, String projectName, String projectRequirement) {
        this.standardId = standardId;
        this.projectNum = projectNum;
        this.projectName = projectName;
        this.projectRequirement = projectRequirement;
    }

    // getter和setter方法
    public Integer getInspectionId() { return inspectionId; }
    public void setInspectionId(Integer inspectionId) { this.inspectionId = inspectionId; }

    public Integer getStandardId() { return standardId; }
    public void setStandardId(Integer standardId) { this.standardId = standardId; }

    public String getProjectNum() { return projectNum; }
    public void setProjectNum(String projectNum) { this.projectNum = projectNum; }

    public String getProjectName() { return projectName; }
    public void setProjectName(String projectName) { this.projectName = projectName; }

    public String getProjectRequirement() { return projectRequirement; }
    public void setProjectRequirement(String projectRequirement) { this.projectRequirement = projectRequirement; }

    @Override
    public String toString() {
        return String.format("检验要求[编号=%s, 名称=%s, 要求=%s]",
                projectNum, projectName,
                projectRequirement != null && projectRequirement.length() > 20 ?
                        projectRequirement.substring(0, 20) + "..." : projectRequirement);
    }
}